home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Night Owl 6
/
Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso
/
014a
/
cofbrk10.zip
/
COFFEE.DOC
next >
Wrap
Text File
|
1991-10-28
|
27KB
|
727 lines
THE COFFEE BREAKER
VERSION 1.00
OCTOBER 31, 1991
BY LORNE SUNDBY, CGA
Hi! I'm not here
Out at 11:45
Gone for coffee
Back at 12:15
(note the fancy title page)
INTRODUCTION
------------
My computer at work has a utility to prevent screen burn-out,
where the screen simply goes blank when I'm not there to use it.
If I'm out of my office, people wander in and say "Where is he"
and stare at my blank computer screen. I saw this as an untapped
informative device. So, I created the COFFEE BREAKER, which
essentially says that I'm gone. It also tells them when I left,
when I'm back. For fun, I made the message into a box that is
multi-coloured. And, to prevent screen burn-out, the box
randomly floats around the screen. A critical feature was that
it was not overly difficult to program. You see, I'm new at
this.
COFFEE BREAKER is a screen utility program. In its most basic
form, it leaves a colourized message on your monitor, telling
passers-by that you have gone for coffee, and giving the time (30
minutes hence) that you will be back. The message randomly moves
about the screen to, thus preventing burnout while being
informative. Using the programs customizing capabilities, you
can extend COFFEE BREAKER's function to alert viewers of any
reasons for your absence, with any timeframes for return. At the
very least, the program will assist in using up valuable hard
drive space.
DISCLAIMER
----------
This is the customary statement about what the program can and
cannot do, so that you don't sue me when it doesn't perform to
the same capabilities as, say, Lotus 1-2-3 (note: that was a
registered trademark of the Lotus Development Corporation - I
don't want them to sue me either). Basically, it is unlikely
that this program will do anything bad except maybe force you to
re-boot if something truly awful occurs. Certainly, something as
destructive as a meltdown or pregnancy is unlikely. But we make
these statements anyways, because you never know.
So, this program is provided as is, with no guarantees,
warranties, or other certifications. I assume no liability or
responsibility for any damages of any kind caused by using or not
using the program. By operating the program, you as the user
assume all risk either realized, perceived, or potential. Also,
if my instructions aren't right, I can't be blamed for that
either.
Additionally, if this program in any way affects the performance
of the Toronto Maple Leaf hockey club, that too isn't my fault.
SYSTEM REQUIREMENTS
-------------------
As far as I can tell, there is only one thing you really need in
order for this to work, and that is a colour monitor. This
program will not work on monochrome systems at all, rendering it
totally unimpressive. Not that it's a hot property in colour,
either, but at least it is less ordinary under those
circumstances.
It works from a floppy or hard disk, in any subdirectory at all.
But this is version 1.00, so, haha, be smart - create a
subdirectory called COFFEE and put it there. As best I can tell,
it works with any amount of basic RAM memory - it does not access
anything over 640K. At least not intentionally.
As for systems, I have tested the program on XT, 286, 386, and
486 systems of several varieties. As long as the system is a
colour one, everything is fine. But if it doesn't work on your
computer, please let me know all about it. It's not likely I can
fix it, but it helps to have someone to listen to.
THE FILES
---------
The files come in a self-extracting archive file called
COFBRK.EXE. Once extracted, two files should appear:
COFFEE.DOC The docs file. This one.
COFFEE.EXE The executable file. The one that does all the
stuff.
The program is written in Borland's Turbo C++ environment, using
the C (no plus plus) language. Hell of a language. Good work
Borland.
BASIC USE
---------
From the DOS prompt or a batch file, type
COFFEE
That's pretty well it. You downloaded that? Well, there's more,
but not much more. Check out the sections that follow. But by
simply typing COFFEE at the DOS prompt, you get the canned,
default version of the program. You are gone for 30 minutes on a
coffee break. So, the message box says this, telling when you
left and when you will be back (rounded to the nearest 15
minutes). The message box floats around the screen until you hit
a key, whereupon you are back to the DOS prompt. For excitement,
the colours change.
But, sometimes you are out but not on coffee; and sometimes, you
aren't gone for 30 minutes; and sometimes you don't want people
to know when you left (like, for coffee breaks). In such
instances, you need one of COFFEE BREAKER's customization
features.
COMMAND LINE CUSTOMIZING
------------------------
Try typing
COFFEE HELP
at the DOS prompt. A primitive, yet functional help screen
appears, telling you the command line options that can be used to
make COFFEE BREAKER do more than just squawk about you being on a
coffee break. What is a command line option? Well, the word
HELP after COFFEE above is one. And in COFFEE BREAKER, there are
eight different options, some of which can be combined.
Here are the options, and an explanation as to how each works:
NAME="text" The NAME line is the top line of the box. The
default NAME is "Hi! I'm not here", but if you
want something different displayed, you can
override the default with the NAME= command line
option. For example, to indicate "John Smith is
in a meeting", type
COFFEE NAME="John Smith is in a meeting"
Don't forget the quotes or the equal sign,
otherwise weird things happen (see disclaimer).
NONAME The NONAME command line option suppresses a
message on the top line of the box. All that will
appear is a plain double line. You can't use this
option and the NAME="text" option at the same
time, because they are mutually exclusive
(technical term for "don't be stupid").
MESS="text" The MESS line is the line appearing between the
"Out at" and "Back at" messages. The default is
"Gone for coffee". Of course, if you're not gone
for coffee, then the message is wrong, possibly
misleading, potentially litigious (see disclaimer
again). Maybe
COFFEE MESS="Meeting in Boardroom 14A"
is more appropriate. The MESS= and NAME= command
lines can often be combined to give quite
informative messages.
COFFEE NAME="John Q. Smith" MESS="is a
weenee..."
(my apologies if you are actually John Q. Smith)
NOMESS The NOMESS command line option suppresses the
message line. The "Out at" and "Back at" messages
will be one on top of the other with no space.
You can't use this option and the MESS="text"
option at the same time (see "don't be stupid"
above)
NOOUT Some people don't like other people to know when
they left. Like when going for coffee. He he he.
So, if you want the time you departed to be a
secret, include NOOUT on the command line and the
"Out at" line will be omitted. The command
COFFEE NOOUT
tells people that you are out for coffee and will
be back 30 minutes hence, but doesn't say when you
left. Helpful if your coffee break is, say, 15
minutes.
MINOUT= The default is 30, but you can put in any number
of minutes. If you put in more minutes that are
left in the day, this can get confusing (since
COFFEE BREAKER does not recognize days and dates).
So, if you have a two hour meeting in the
Executive Washroom,
COFFEE NAME="I'm not here" MESS="Meeting in
Executive Washroom" NOOUT MINOUT=120
will produce a helpful message. Notice that the
time you return is rounded to the next quarter
hour. Although less precise, it does give you
some leeway if things run a bit long.
If you are gone, but have no idea when you will be
back, or don't care to advertise that fact, then
use MINOUT=0. This will suppress the display of
the time you are back. Try
COFFEE NONAME MESS="Gone clam digging, back
tomorrow" NOOUT MINOUT=0
This is the most effective way to indicate when
you are gone beyond the end of the current day.
HELP Displays the help screen. Note that small version
of the message block in the top right corner. Big
help that is.
If you find a command line option you like or use often, then you
can insert it into a batch file. Common COFFEE BREAKER commands
can be developed and repeated this way. For example,
STAFF.BAT could be
COFFEE NAME="I'm having a staff meeting" MESS="Might never
be back, but likely" MINOUT=120
LUNCH.BAT could be
COFFEE NAME="I'm eating lunch" NOMESS NOOUT MINOUT=60
VACATION.BAT could be
COFFEE NAME="HEY! I'M ON HOLIDAYS!!!" MESS="Check with my
assistant" NOOUT MINOUT=0
The command line options are helpful, but not very massively
friendly. A more user friendly version of addressing COFFEE
BREAKER is possible. This is often known as "busy, wildly
colourful and impossible to explain full-screen input tool". I
call it the CONFIG screen.
CONFIG SCREEN CUSTOMIZATION
---------------------------
At the DOS prompt, type
COFFEE CONFIG
This provides you with a full-screen configuration device, in
living colour at that. You use the keyboard to move amongst the
various options, designing what you want the message box to look
like. The currently selected message box is displayed at the top
of the screen - based on the options picked so far, this is what
the box would look like. When you first start the COFFEE BREAKER
config screen, the program defaults appear.
I will now attempt to describe how to use the config screen.
However, as most of you know already, documentation on these
things is really lousy. Trial and error works best. So only if
you're really desperate, read the following explanations.
There are eight "option blocks" on the config screen:
Name line display options:
You either specify that no name line display is to occur, or
you specify the text that is to appear on the name line.
Message line display options:
You either specify that no message line display is to occur,
or you specify the text that is to appear on the message
line.
Time out display options:
Either the time you left is or is not displayed, according
to the selection made here.
Time back display options:
The time back is either not displayed, or it is. If the
time back is displayed, you specify the number of minutes to
be added to the current time, to be displayed as the time
you will return (rounded to the nearest 15 minutes).
Make batch file:
Selecting this option creates a one-line batch file that
will re-create the selections you have made. The batch file
makes use of the command line options described earler,
allowing you to repeat any commonly used reasons for
departing. See the section describing command line options.
The option creates a batch file with a .BAT extension on the
name you select. If the file already exists, the new batch
file will not be created. This ensures that you don't over-
write an existing, somewhat important file.
OK:
Accepts the options selected, ends the configuration screen
process, and starts the randomly moving box around the
screen.
Quit:
Exits to the DOS prompt, and abandons the selections you
have made.
Defaults:
Restores the selections to the defaults of the COFFEE
BREAKER. No error checking here - so don't accidentally
pick this command.
The following are the major movement controls in use on the
config screen:
TAB: Moves from option block to option block, top to bottom,
left to right. As you move, the currently active block is
highlighted.
SHIFT-TAB: Moves the other way - bottom to top, right to
left.
There are three types of input modes on this screen:
1. Radio buttons. There are four radio button option blocks.
These are designated by the ( ) prior to the option name. Each
option block has a radio button (a dot, which refuses to print on
my word processor, but would appear here if it did) beside one
option only. The dot is always beside one option, never both and
never neither.
When a radio button option block is current:
UP/DOWN ARROW: Changes the selected option. Notice how the
message box at the top of the screen changes when you change
the options.
When the currently selected option is an input option (i.e.
Name):
HOME: Retains the existing input, places the cursor in the
first character position. Accepts keyboard input in
typeover mode.
END: Retains the existing input, places the cursor in the
last character position. Accepts keyboard input in typeover
mode.
ANY OTHER KEY: Erases the existing input, and makes the key
you pressed the first character of the new input. Accepts
further input in typeover mode.
When in the input mode:
HOME: Moves to the first character position.
END: Moves to the last character position.
INS: Toggles the insert mode. A block cursor means that you
are in insert mode: input you type will be inserted between
existing text, and will not write it over. A line cursor
means you are in typeove mode: input you type will write
over the existing text.
BACKSPACE: Erases the character to the left of the cursor.
DELETE: Erases the character that the cursor is presently
sitting under/on.
ENTER: Accepts the text typed.
2. Toggle box. There is only one toggle box option block on the
config screen - for "Make batch file". If it is not selected, [
] appears. If it is selected, [X] appears. To select the
toggle, enter text in the input field. To unselect the toggle,
delete all the text in the input field.
When the currently selection option is the toggle box:
HOME: Retains the existing input, places the cursor in the
first character position. Accepts input, currently in
typeover mode.
END: Retains the existing input, places the cursor in the
last character position. Accepts input, currently in
typeover mode.
ANY OTHER KEY: Erases the existing input, and makes the key
you pressed the first character of the new input. Accepts
further input, in typeover mode.
When in the input mode:
HOME: Moves to the first character position.
END: Moves to the last character position.
INS: Toggles the insert mode. A block cursor means that you
are in insert mode: input you type will be inserted between
existing text, and will not write it over. A line cursor
means you are in typeove mode: input you type will write
over the existing text.
BACKSPACE: Erases the character to the left of the cursor.
DELETE: Erases the character that the cursor is presently
sitting under/on.
ENTER: Accepts the text typed.
3. Shadow option block. The three shadow option blocks appear on
the bottom row of the config screen. There is really no option
of any kind - selecting them executes the function. If you have
highlighted a shadow option block, hitting enter executes the
function.
Instead of using the TAB/SHIFT-TAB/UP/DOWN keys to navigate the
config screen, you can directly select any option using ALT- plus
a letter key. Each option has a letter displayed in yellow. By
using ALT- plus that letter, you directly select that option.
For example, ALT-i immediately selects "No time out display" and
the message box at the top of the screen suppresses the time out
line. Also using this feature, ALT-o accepts current input and
starts the message display process immediately (without having to
TAB to the OK box and hit ENTER).
Once you accept a message box and start the program operating by
selecting OK, you can't get back and edit the config screen. You
have to start over. Keep in mind that the message box displayed
at the top of the screen is exactly what the message box will
look like as it floats around your screen. So if you don't like
it, change it before you say OK.
MOUSE SUPPORT
-------------
Ain't none. And, cripes, is it ever hard to program it in. I've
worked for over three weeks trying to use my mouse on the CONFIG
screen and it doesn't work worth crap. This may never be an
enhancement if this keeps up.
PLANNED UPGRADES
----------------
1. Mouse Support
See above. Don't know if I'm up to this one.
2. TSR support.
Optionally, install as a pop-up utility. Allows for quicker
loading and execution. Once the user returns and hits a key, the
application in use at the time the utility was popped-up will
resume. Ho boy, I can just see what parts of the RAM I can
destroy trying to make this part work. Guaranteed, this will
conflict with most everything you currently run.
3. Integration with the currently popular screen art programs.
In my office, the popular thing to leave on the computer is
one of maybe six forms of screen art. You know them: explosions,
fractals, cubes, drips, spins, kaleidoscopes, etc. A possible
upgrade would be to allow the user to specify the screen art they
use and "teach" COFFEE BREAKER how to call the screen art. Then,
run the message box for ten seconds, followed by 10 seconds of
screen art, then back to the message box and so on. Best of both
worlds: slightly drug-induced screen display combined with more
informative but slightly less impressive box.
4. Whatever the users come up with.
Possible option is scrapping the software program all
together. Suits me.
REGISTRATION
------------
You are granted a license to try this program free of charge for
a period of 103 years. If you continue to use it after the trial
period is over, you must register by sending $250,000 to
Lorne Sundby
20 Alderwood Boulevard
St. Albert, Alberta, Canada
T8N 3Z6
If you are one of those people who tries software and insists on
paying something for it no matter what, then by all means do so.
I'll call this "charity-ware". If you seriously like my program
and insist it has some redeeming social value, and you must pay
someone for it, then OK: send $20 to your local animal
protection/cruelty prevention agency, and at the same time drop
me a note saying you've done so. Any cheques, cash or money
orders sent directly to me will be forwarded to the Edmonton
Society for the Prevention of Cruelty to Animals (SPCA) in your
name. I'll send you the confirmation/thanks note they send to
me. But really, get serious. Send money for this?
Until this thing gets bigger, the only support for the program
will be through Compuserve. If I know who you are, I'll tell you
when COFFEE BREAKER is upgraded, so you can download the newest
version. So whether you send money somewhere or not, if you're
using the program, identify yourself. I'll let you know when I
post an upgrade.
THE AUTHOR
----------
The author is a largely smart-ass accountant living in St.
Albert, Alberta, Canada (near Edmonton - you know, "the Mall"?!).
He has programmed in several languages since acquiring his first
computer, the TRS-80 Model I in 1978. Turbo C++ is a new
adventure, and this is his first programming project. And a damn
fun one at that. Much better than COBOL or BASIC. However, he
has found programming in C equivalent to driving 120 MPH in dense
fog down the wrong way of a one way street. Draw your own
conclusions. He is convinced that the code of COFFEE BREAKER
could win a competition for the most sensationally inefficient
code in the language's history. He'll work on that.